<?
/******************************************
* ZEMPLATE
* ---------------------------
* A PHP template by Zenyai
* 
* For more information: http://code.google.com/p/zemplate/
* This project is under an open source license (Apache License, Version 2.0)
* http://www.apache.org/licenses/LICENSE-2.0
*
*******************************************/

// this function required jQuery
class FadeIn {
	function __construct($var) {
		$this->var = $var;
		include_once('zemplate/functions/LoadDB.functions.php');
	}
	
	function load() {
		$database = new LoadDB(array("pref", true, false));
		$FadeIn = '<script type="text/javascript">
$(document).ready(function() {
	$("body").css("display", "none");
		$("body").fadeIn(' . $database->getRow("home_fadein") . ');
		$("body").delay(' . $database->getRow("home_delay") . ').fadeOut(' . $database->getRow("home_fadeout") . ', redirectPage);
	function redirectPage() {
		window.location = "popup.php";
	}
});
</script>';
		return $FadeIn;
	}
}
?>